package com.cskaoyan.controller.indexController;


import com.cskaoyan.model.vo.extend.BaseRespVo;
import com.cskaoyan.model.vo.IndexAllInfoVo;
import com.cskaoyan.service.index.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexDashboardController {

    @Autowired
    @Qualifier("indexServiceImpl")
    IndexService indexService;

    @RequestMapping("/admin/dashboard")
    public BaseRespVo dashboard(){

        IndexAllInfoVo indexAllInfoVo = indexService.getIndexAllInfo();
        return BaseRespVo.ok(indexAllInfoVo);
    }
}
